import request from '@/utils/request'
// import requestNav from '@/utils/wyRequestNav'
// 首页
export interface indexData{
    // 三个 tag 
    policyDescList:policyDesc[]
    // 轮播图
    focusList:focus[]
    // 导航List
    kingKongModule:kingKong
    // 小轮播
    bigPromotionModule:floor
    //新人专享礼
    indexActivityModule:indexActivity[]
    //类目热销榜
    categoryHotSellModule:categoryHotSell
    // 底部
    sceneLightShoppingGuideModule:Shopping[]
}

// 三个tag
export interface policyDesc{
    desc:string,
    icon:string
}
// 轮播图
export interface focus{
    picUrl:string
}
// 导航List
export interface kingKong{
    kingKongList:kingKongItem[]
}
export interface kingKongItem{
    picUrl:string
    text:string
}
// 小轮播
export interface floor{
    floorList:floorItem[]
}
export interface floorItem{
    cells:ItemLists[]
}
export interface ItemLists{
    itemList:ItemImg[]
    picUrl:string
}
export interface ItemImg{
    picUrl:string
}

// 新人专享礼物
export interface indexActivity{
    picUrl:string
    title:string
}
//类目热销榜
export interface categoryHotSell{
    categoryList:categoryItem[]
}
// 小型导航
export interface categoryItem{
    categoryName:string
    picUrl:string
}
// 底部
export interface Shopping{
    styleBanner:sceneLightShopping
    styleItem:sceneLightShopping2
}
export interface sceneLightShopping{
    title:string
    desc:string
    picUrl:string
}
export interface sceneLightShopping2{
    title:string
    desc:string
    picUrlList:string[]
}







export function homeData(){
    return request.get<any,indexData>('/xhr/index.json?__timestamp=1662542610854&')
}




export interface daohangData{
    categoryItemList:category[]
    currentCategory:banners
}
interface banners{
    bannerList:bannerSwiper[]
}
interface bannerSwiper{
    id:number
    picUrl:string
}
export interface category{
    frontDesc:string
    frontName:string
    name:string
    itemList:items[]
}
interface items{
    name:string
    retailPrice:number
    scenePicUrl:string
}
// 导航页
export function NavData(){
    return request.get<any,daohangData>('/item/list.json?__timestamp=1630136511866&categoryId=1005000')
}